package com.molichuxing.gateway.bff.financial.services;

import com.molichuxing.gateway.bff.financial.entity.response.ContractRenegeParamsVo;
import com.molichuxing.gateway.bff.financial.entity.response.ContractVo;
import com.molichuxing.gateway.bff.financial.entity.response.ConvertSendEmailVo;
import com.molichuxing.gateway.bff.orders.entity.request.modify.ReturnCarModifyVo;
import com.molichuxing.gateway.bff.orders.entity.request.modify.TradeDeliveryModifyVo;

import java.util.List;

/**
 * 合同相关bff
 *
 * @author zhaopenghui
 * @date 2019年10月11日
 */
public interface ContractBffService {

	/**
	 * 合同列表
	 *
	 * @param orderCode
	 * @return
	 * @throws Exception
	 */
	List<ContractVo> getContractList(Long orderCode) throws Exception;

	/**
	 * 发送邮件
	 *
	 * @param convertSendEmailVo
	 * @return
	 * @throws Exception
	 */
	Boolean sendEmailAttachments(ConvertSendEmailVo convertSendEmailVo) throws Exception;

	/**
	 * 生成合同-提车完成
	 * <p>
	 * 订单号
	 *
	 * @return
	 * @throws Exception
	 */
	Boolean createContractByDelivery(TradeDeliveryModifyVo modifyVo);

	/**
	 * 生成还车单-还车完成
	 *
	 * @param modifyVo
	 * @return
	 */
	Boolean createContractByReturnCar(ReturnCarModifyVo modifyVo);

	/**
	 * 查询退租解除协议参数信息
	 *
	 * @param orderCode 订单号
	 * @param userId    用户id
	 * @return
	 */
	ContractRenegeParamsVo getContractRenegeParams(Long orderCode, Integer userId, boolean selectMainContract) throws Exception;

	/**
	 * 生成退租解除协议
	 *
	 * @param orderCode 订单号
	 * @param userId    用户id
	 * @return
	 * @throws Exception
	 */
	Boolean createContractByRenege(Long orderCode, Integer userId) throws Exception;

}
